package org.jeecg.qis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.qis.entity.QisProcdetailValue;
import org.apache.ibatis.annotations.Param;
import org.jeecg.qis.vo.QisProcDetailValueVO;
import org.jeecg.qis.vo.QisProcInspectHisVO;

import java.util.List;
import java.util.Map;

/**
 * @Description: 过程检验单明细表
 * @Author: shaolong
 * @Date: 2022-10-11
 * @Version: V1.0
 */
public interface QisProcdetailValueMapper extends BaseMapper<QisProcdetailValue> {


    List<Map<String, String>> queryDetailColumnList(@Param("param") Map<String, String> param);

    List<Map<String, String>> queryDetailList(@Param("headid") String headid);

    List<Map<String, Object>> queryUNITSNList(@Param("param") Map<String, String> param);

    /**
     * 通过主表id删除子表数据
     *
     * @param mainId 主表id
     * @return boolean
     */
    public boolean deleteByMainId(@Param("mainId") String mainId);

    /**
     * 通过主表id查询子表数据
     *
     * @param mainId 主表id
     * @return List<QisProcdetailValue>
     */
    public List<QisProcdetailValue> selectByMainId(@Param("mainId") String mainId);

    List<QisProcDetailValueVO> selectDetailListByHeadId(@Param("recId") String recId);

    IPage<QisProcInspectHisVO> getProcInspectHispage(Page<QisProcInspectHisVO> page, @Param("param") Map<String, String> param);
}
